<!DOCTYPE html>
<head>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
    <div id="Application">
        <div>点击次数：{{count}}</div>
        <button @click="click">点击</button>
    </div>
    <script>
        const App = {
            data(){
                return {
                    count:0
                }
            },
            methods:{
                click(){
                    this.count++,
                    document.getElementById("Application").append(this.count)
                }
            },
            watch:{
                count(oldvalue, newvalue){
                    document.getElementById("Application").append("old:" + oldvalue + ", new:" + newvalue)
                }
            }
        }
    </script>
    <script>
        Vue.createApp(App).mount('#Application')
    </script>
</body>